import {Component, OnInit} from '@angular/core';
import {ElasticSearchService} from "../../../shared/service/es/elastic-search.service";

@Component({
  selector: 'app-privileges',
  templateUrl: './privileges.component.html',
  styleUrls: ['./privileges.component.scss']
})
export class PrivilegesComponent implements OnInit {
  result: any[] = []

  constructor(
    private es: ElasticSearchService,
  ) {
  }

  ngOnInit(): void {
    this.search()
  }

  search() {
    this.es.getRequest(`/_security/privilege`).subscribe(r => {
      // this.result = _.toPairs(r)
      console.log(r)
    })
  }
}
